package week02;

import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;

public class TextScanner2 {

  private static void readFile(String fileName) {
	  String temp =new String();
    try {
      File file = new File(fileName);
      Scanner  scanner = new Scanner(file);
      scanner.useDelimiter
      (System.getProperty("line.separator"));
      while (scanner.hasNext()) {
    	  temp = scanner.next();

         System.out.println(temp);
      }
     
      scanner.close();
    } catch (FileNotFoundException e) {
      e.printStackTrace();
    }
  }

  public static void main(String[] args) {
    if (args.length != 1) {
      System.err.println("usage: java TextScanner1"
        + "file location");
      System.exit(0);
    }
    readFile(args[0]);



     String Temp = new String();
    Temp="da";
    String Continuare = new String();

 do{
          System.out.print("Mai doriti inca o interogare ? (da/nu)");
          // Continuare  = myScanner.next();
          // conditie = Continuare.equals(Temp);
    } while (true);
         
  }
}